{% extends 'base.html' %}
{% load staticfiles %}

{% block content %}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        {%if msg%}
        <div class="alert alert-success">
            <strong>{{msg}}</strong>
        </div>
        {%endif%}
    <h2 class="page-header">修改信息</h2>
    <div>
        <form class="form-horizontal" method="POST" action="/client/edit?id={{staff.id}}">
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">用户名</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="username" id="inputEmail3" value={{client.name}} readonly>
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">身份证</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="id_card" id="inputEmail3" value={{client.id_card}} readonly>
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">手机号</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="mobile" id="inputEmail3" value={{client.mobile}}>
                </div>
            </div>
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label">会员等级</label>
                <div class="col-sm-5">
                    <select class="form-control" name='rant' id="staff-type" {%if user.type >= 2%}disabled="true"{%endif%}>
                        <option value="1" {%if client.rant == 0%}selected = "selected"{%endif%}>钻石会员</option>
                        <option value="2" {%if client.rant == 1%}selected = "selected"{%endif%}>白金会员</option>
                        <option value="3" {%if client.rant == 2%}selected = "selected"{%endif%}>黄金会员</option>
                        <option value="4" {%if client.rant == 4%}selected = "selected"{%endif%}>普通会员</option>
                    </select>
                </div>
            </div>
            <input type="hidden" name="id" value="{{client.id}}">
            {% csrf_token %}
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-2">
                    <button type="submit" class="btn btn-primary">修改</button>
                </div>
            </div>
        </form>
    </div>
</div>
{% endblock %}